package com.kechen.client.pojo;

import com.kechen.client.fegin.Myfegin;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @Author 0xHertz
 * @Date: 2022/11/7 0007 16:26
 * @Description: 第一种方式进行Fallback
 **/
@Component
@RequestMapping("/fallback")
public class MyFallBack implements Myfegin {
    @Override
    public String index() {
        return "出现问题来了！！！";
    }

    @Override
    public User findById(Integer id) {
        return new User(0,"出现问题来了",0);
    }

    @Override
    public User getUser(Integer id, String name) {
        return new User(0,"出现问题来了",0);
    }

    @Override
    public User save(User customer) {
        return new User(0,"出现问题来了",0);
    }
}
